/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MenuPerfil.java
 *
 * Created on 2/06/2009, 12:17:45 AM
 */
package gui;

import javax.swing.JFrame;

/**
 *
 * @author Arquitectura
 */
public class MenuPerfil extends javax.swing.JFrame {

    private String Usuario;
    private Home gc;

    /** Creates new form MenuPerfil */
    public MenuPerfil() {
        initComponents();
        
        xPnlFondo pnlFondo = new xPnlFondo(15);
        this.add(pnlFondo);
        this.pack();
        this.setSize(800, 635); //El 635 depende (alto) depende del Skin usado.
        this.setLocationRelativeTo(null);
    }

    public MenuPerfil(String usuario, Home gc) {

        this.Usuario = usuario;
        this.gc = gc;

        initComponents();
        xPnlFondo pnlFondo = new xPnlFondo(15);
        this.add(pnlFondo);
        this.pack();
        this.setSize(800, 635); //El 635 depende (alto) depende del Skin usado.
        this.setLocationRelativeTo(null);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        BTN_verPerfil = new javax.swing.JButton();
        BTN_modificarPerfil = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        BTN_verPerfil.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/BTN_verperfil_MP.png"))); // NOI18N
        BTN_verPerfil.setBorder(null);
        BTN_verPerfil.setBorderPainted(false);
        BTN_verPerfil.setContentAreaFilled(false);
        BTN_verPerfil.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/BTN_verperfil_roll_MP.png"))); // NOI18N
        BTN_verPerfil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTN_verPerfilActionPerformed(evt);
            }
        });

        BTN_modificarPerfil.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/BTN_modificarperfil_MP.png"))); // NOI18N
        BTN_modificarPerfil.setBorder(null);
        BTN_modificarPerfil.setBorderPainted(false);
        BTN_modificarPerfil.setContentAreaFilled(false);
        BTN_modificarPerfil.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/BTN_modificarperfil_roll_MP.png"))); // NOI18N
        BTN_modificarPerfil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTN_modificarPerfilActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(286, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(BTN_modificarPerfil)
                    .addComponent(BTN_verPerfil))
                .addGap(279, 279, 279))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(209, 209, 209)
                .addComponent(BTN_verPerfil)
                .addGap(18, 18, 18)
                .addComponent(BTN_modificarPerfil)
                .addContainerGap(241, Short.MAX_VALUE))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-800)/2, (screenSize.height-600)/2, 800, 600);
    }// </editor-fold>//GEN-END:initComponents

    private void BTN_verPerfilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTN_verPerfilActionPerformed
        // TODO add your handling code here:
        this.setVisible(false);
        //Usuario, Home
        VerPerfilJugador vmp = new VerPerfilJugador(this.Usuario, this.gc);

        JFrame.setDefaultLookAndFeelDecorated(true);

        vmp.setVisible(true);
    }//GEN-LAST:event_BTN_verPerfilActionPerformed

    private void BTN_modificarPerfilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTN_modificarPerfilActionPerformed
        // TODO add your handling code here:
        this.setVisible(false);
        //Usuario, Home
        ModificarPerfil mp = new ModificarPerfil(this.Usuario, this.gc);

        JFrame.setDefaultLookAndFeelDecorated(true);

        mp.setVisible(true);
    }//GEN-LAST:event_BTN_modificarPerfilActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new MenuPerfil().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BTN_modificarPerfil;
    private javax.swing.JButton BTN_verPerfil;
    // End of variables declaration//GEN-END:variables
}
